html
	script(src='/javascripts/jquery-1.10.2.min.js')
	script(src='/javascripts/bootstrap.js')
	script(src='/javascripts/bootstrap-paginator.min.js')
	script(src='/javascripts/util.js')
	head
		meta(http-equiv='Content-Type', content='text/html; charset=UTF-8')
	title
	link(rel='stylesheet', href='/stylesheets/style.css')
	link(rel='stylesheet', href='/stylesheets/bootstrap.css')
	link(rel='stylesheet', href='/stylesheets/bootstrap-theme.min.css')
	body
		div.navbar.navbar-inverse.navbar-fixed-top
			div.container
				div.navbar-header
					button.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse')
						span.icon-bar
						span.icon-bar
						span.icon-bar
				div.navbar-collapse.collapse
					ul.nav.navbar-nav
						li.active
							a(href='/') 主页
					ul.nav.navbar-nav.pull-right
						-if(!user)
							li
								a(href='/login')登录  
							li
								a(href='/reg')注册
						-else
							li
								a(href='/') #{user.name}
							li
								a(href="/logout")退出	
		div#container.container-fluid
				- if (success && success.length)
					div.alert.alert-success
						= success
				- if (error && error.length)
					div.alert.alert-danger
						= error
	block content